﻿using System;
using System.ServiceProcess;

namespace DebuggableWindowsService
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main(string[] args)
        {
            using(var implementation = new ServiceImplementation())
            {
                if(Environment.UserInteractive)
                {
                    ConsoleHarness.Run(args, implementation);
                }
                else
                {
                    ServiceBase.Run(new WindowsServiceHarness(implementation));
                }
            }
        }
    }
}
